package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.FirmPurchaseInboundMapper;
import com.ruoyi.purchase.domain.FirmPurchaseInbound;
import com.ruoyi.purchase.service.IFirmPurchaseInboundService;

/**
 * 商品入库Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-17
 */
@Service
public class FirmPurchaseInboundServiceImpl implements IFirmPurchaseInboundService 
{
    @Autowired
    private FirmPurchaseInboundMapper firmPurchaseInboundMapper;

    /**
     * 查询商品入库
     * 
     * @param id 商品入库主键
     * @return 商品入库
     */
    @Override
    public FirmPurchaseInbound selectFirmPurchaseInboundById(Long id)
    {
        return firmPurchaseInboundMapper.selectFirmPurchaseInboundById(id);
    }

    /**
     * 查询商品入库列表
     * 
     * @param firmPurchaseInbound 商品入库
     * @return 商品入库
     */
    @Override
    public List<FirmPurchaseInbound> selectFirmPurchaseInboundList(FirmPurchaseInbound firmPurchaseInbound)
    {
        return firmPurchaseInboundMapper.selectFirmPurchaseInboundList(firmPurchaseInbound);
    }

    /**
     * 新增商品入库
     * 
     * @param firmPurchaseInbound 商品入库
     * @return 结果
     */
    @Override
    public int insertFirmPurchaseInbound(FirmPurchaseInbound firmPurchaseInbound)
    {
        return firmPurchaseInboundMapper.insertFirmPurchaseInbound(firmPurchaseInbound);
    }

    /**
     * 修改商品入库
     * 
     * @param firmPurchaseInbound 商品入库
     * @return 结果
     */
    @Override
    public int updateFirmPurchaseInbound(FirmPurchaseInbound firmPurchaseInbound)
    {
        return firmPurchaseInboundMapper.updateFirmPurchaseInbound(firmPurchaseInbound);
    }

    /**
     * 批量删除商品入库
     * 
     * @param ids 需要删除的商品入库主键
     * @return 结果
     */
    @Override
    public int deleteFirmPurchaseInboundByIds(Long[] ids)
    {
        return firmPurchaseInboundMapper.deleteFirmPurchaseInboundByIds(ids);
    }

    /**
     * 删除商品入库信息
     * 
     * @param id 商品入库主键
     * @return 结果
     */
    @Override
    public int deleteFirmPurchaseInboundById(Long id)
    {
        return firmPurchaseInboundMapper.deleteFirmPurchaseInboundById(id);
    }
}
